/*    */ package com.jcrj.action.interceptor;
/*    */ 
/*    */ import com.jcrj.entity.OUser;
/*    */ import com.opensymphony.xwork2.ActionContext;
/*    */ import com.opensymphony.xwork2.ActionInvocation;
/*    */ import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
/*    */ import java.util.Map;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import org.apache.struts2.ServletActionContext;
/*    */ 
/*    */ public class SessionInterceptor extends AbstractInterceptor
/*    */ {
/*    */   public String intercept(ActionInvocation invocation)
/*    */     throws Exception
/*    */   {
/* 15 */     if (!ServletActionContext.getRequest().isRequestedSessionIdValid()) {
/* 16 */       return "login";
/*    */     }
/* 18 */     OUser user = (OUser)invocation.getInvocationContext().getSession().get("userInfo");
/* 19 */     if (user == null) {
/* 20 */       return "login";
/*    */     }
/* 22 */     return invocation.invoke();
/*    */   }
/*    */ }

/* Location:           /Volumes/work/oa/WEB-INF/classes/
 * Qualified Name:     com.jcrj.action.interceptor.SessionInterceptor
 * JD-Core Version:    0.6.0
 */